import { CurrentLoginTypeEnum, MenuTypeEnum } from 'src/interface';
import { PageModeEnum } from 'src/interface/theme';
import { t } from 'src/locales';

export const loginTypeOptions = [
  { label: 'password', value: CurrentLoginTypeEnum.PASSWORD },
  { label: 'phone', value: CurrentLoginTypeEnum.PHONE },
  { label: 'email', value: CurrentLoginTypeEnum.EMAIL },
];

export const exceptionCodeToMessage = {
  401: t('request.jsonp_not_callback'),
};

export const PageModeStyleFilter = {
  [PageModeEnum.Normal]: 'none',
  [PageModeEnum.Weakness]: 'invert(80%)',
  [PageModeEnum.Grieve]: 'grayscale(1)',
};

export const MenuType = [
  { value: MenuTypeEnum.DIRE, label: '目录' },
  { value: MenuTypeEnum.MENU, label: '菜单' },
  { value: MenuTypeEnum.BUTTON, label: '按钮' },
];
